// import {urlAdd} from "../util/strUtil"
// import {strUtil} from "../util/strUtil"
import strUtil from "../util/strUtil";
class Comic {

  // https://www.jianshu.com/p/58075a9a35d8
  constructor(pageSize) {
    // super();
    // pageSize
    this.pageSize = pageSize;

    this.comic = "jojo/jojo7/"
    // this._volume = 1
    this.volume = 1
    this.volumeName = "JOJO SBR-01"
    this.server = server;
  }

  // constructor(props, context) {
  //   super(props, context);
  //
  // }
  // 只能一个 构造函数吗
  // constructor() {
  //   // this.pageSize = pageSize;
  //
  //   this.comic = "jojo/jojo7"
  //   // this._volume = 1
  //   this.volume = 1
  //   this.pageIndex = 1
  //   this.pageSize = 93
  //   this.volumeName = "JOJO SBR-01"
  //   this.server = "http://starplatinumora.top/images/commic/"
  // }

  // strUtil
  getFullUrlLst() {
    // strUtil
    // strUtil.urlAdd()
    var fullUrlLst = []
    // var fullUrl = urlAdd(this.server, this.comic)
    var fullUrl = strUtil.urlAdd(this.server, this.comic)
    fullUrl =strUtil. urlAdd(fullUrl, this.volumeName)
    for (let i = 0; i < this.pageSize; i++) {
      var pageStr = `${this.volume}-${i + 1}.jpg`
      var fullUrlPic = strUtil.urlAdd(fullUrl, pageStr)
      fullUrlLst.push(fullUrlPic)
    }
    return fullUrlLst
    // var   pageStr=`${this.volume}-${this.pageIndex}`
  }

  // getFullUrl() {
  //
  //   var fullUrl = urlAdd(this.server, this.comic)
  //   fullUrl = urlAdd(fullUrl, this.volumeName)
  //   var pageStr = `${this.volume}-${this.pageIndex}`
  // }


}

export default Comic
